﻿<UserControl x:Class="VH.View.AddReminderView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:resources="clr-namespace:VH.Resources;assembly=VH.Resources"
             xmlns:controls="clr-namespace:VH.UI.UserControls.Controls;assembly=VH.UI.UserControls"
             xmlns:view="clr-namespace:VH.View"
             mc:Ignorable="d">
    <Grid>
        <AdornerDecorator>
            <Grid>
                <ScrollViewer>
                    <Grid Margin="0,10,0,0">
                        <Grid.RowDefinitions>
                            <RowDefinition Height="*" />
                            <RowDefinition Height="Auto" />
                        </Grid.RowDefinitions>

                        <Grid Grid.Row="0">
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="Auto" />
                                <ColumnDefinition Width="Auto" />
                                <ColumnDefinition Width="*" />
                            </Grid.ColumnDefinitions>
                            <Grid.RowDefinitions>
                                <RowDefinition Height="Auto" />
                                <RowDefinition Height="5" />
                                <RowDefinition Height="Auto" />
                                <RowDefinition Height="5" />
                                <RowDefinition Height="Auto" />
                                <RowDefinition Height="5" />
                                <RowDefinition Height="Auto" />
                                <RowDefinition Height="5" />
                                <RowDefinition Height="Auto" />
                                <RowDefinition Height="5" />
                                <RowDefinition Height="Auto" />
                            </Grid.RowDefinitions>

                            <controls:VHLabel
                                AddEndingPunctuation="True"
                                Content="{x:Static  resources:LabelResources.Name}" />
                            <Grid Grid.Column="2">
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="Auto" />
                                </Grid.ColumnDefinitions>
                                <TextBox
                                    x:Name="txtName"
                                    Margin="8,0,0,0"
                                    Text="{Binding Entity.ReminderName, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged, ValidatesOnDataErrors=True}"
                                    Width="200"
                                    MaxLength="150" />
                            </Grid>

                            <controls:VHLabel
                                AddEndingPunctuation="True"
                                Grid.Row="2"
                                Content="{x:Static  resources:LabelResources.Date}" />
                            <Grid
                                Grid.Row="2"
                                Grid.Column="2">
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="Auto" />
                                    <ColumnDefinition Width="Auto" />
                                </Grid.ColumnDefinitions>
                                <DatePicker
                                    Margin="8,0,0,0"
                                    SelectedDate="{Binding Entity.ReminderDate, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged, ValidatesOnDataErrors=True}"
                                    Width="150" />
                            </Grid>

                            <controls:VHLabel
                                AddEndingPunctuation="True"
                                Grid.Row="4"
                                Content="{x:Static  resources:LabelResources.Type}" />
                            <ComboBox
                                Margin="8,0,0,0"
                                Grid.Row="4"
                                Grid.Column="2"
                                Width="120"
                                HorizontalAlignment="Left"
                                SelectedValue="{Binding Entity.ReminderType, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                                view:VHAttachedProperties.BindEnumToItemSource="VH.Model.ReminderType, VH.Model" />

                            <controls:VHLabel
                                AddEndingPunctuation="True"
                                Grid.Row="6"
                                Content="{x:Static  resources:LabelResources.Message}" />
                            <TextBox
                                Margin="8,0,0,0"
                                Grid.Row="6"
                                Grid.Column="2"
                                Text="{Binding Entity.ReminderMessage, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged, ValidatesOnDataErrors=True}"
                                HorizontalAlignment="Left"
                                Width="300"
                                TextWrapping="WrapWithOverflow"
                                AcceptsReturn="True" VerticalContentAlignment="Top" Height="40" />
                        </Grid>

                        <Grid
                            HorizontalAlignment="Center"
                            Grid.Row="1">
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="Auto" />
                                <ColumnDefinition Width="10" />
                                <ColumnDefinition Width="Auto" />
                            </Grid.ColumnDefinitions>
                            <Button
                                Content="{x:Static  resources:ButtonResources.Save}"
                                Command="{Binding SaveCommand}" />
                            <Button
                                Content="{x:Static  resources:ButtonResources.Cancel}"
                                Grid.Column="2"
                                Command="{Binding CancelCommand}" />
                        </Grid>
                    </Grid>
                </ScrollViewer>
            </Grid>
        </AdornerDecorator>
    </Grid>
</UserControl>
